package Thread;

/**
 * Lambda表达式
 * 练习:
 */
public class AddDemo {
    public static void main(String[] args){
      /*  Add add=new Add() {
            @Override
            public double sum(int x, int y) {
                return x+y;
               }
            };*/

        Add add = (x,y)->x+y;
        System.out.println("求和:"+add. sum( 100,  200));

    }
}
    interface Add{
        public abstract double sum(int x,int y);
}
  /*class Sum implements Add{
      public double sum(int x, int y) {
          return x + y;
      }
      }
   */
